<template>
  <button @click="handleClick" :class="['flat-btn btn-a hvr-grow-shadow', size]">
    <slot></slot>
  </button>
</template>

<script>
export default {
  props: {
    size: {
      type: String,
      default: "btn-big"
    },
  },
  computed: {
    key () {
      return this.$route.path + Math.random()
    }
  },
  methods: {
    handleClick () {
      this.$emit('click')
    }
  }
}
</script>

<style scoped>
.flat-btn {
  background: #806e22;
  border-style: none;
  color: #fff;
  cursor: pointer;
  transition: .3s;
  display: inline-block;
}

.flat-btn:hover {
  opacity: 0.9;
}

.btn-a {
  text-decoration: none;
}

.btn-big {
  padding: 15px 20px;
  font-size: 1rem;
}

.btn-small {
  padding: 7px 15px;
  font-size: 0.9rem;
}

.flat-btn i {
  vertical-align: middle;
}

.btn-medium {
  padding: 10px 15px;
  font-size: 0.9rem;
}
</style>